Skip to content

OS independent logical locs#2644

Merged
PaulKlint merged 19 commits intomainfrom
fix/os-dependent-logical-locs
Feb 16, 2026
Merged

OS independent logical locs#2644
PaulKlint merged 19 commits intomainfrom
fix/os-dependent-logical-locs

Conversation

@toinehartman
Copy link
Member

@toinehartman toinehartman commented Feb 11, 2026

  • Remove whitespace from MD5 checksums used in logical locations, to make them OS-independent.
  • Separate and escape MD5 contributions to reduce the chance of collisions.

Breaking changes
This PR extends normalisation to the complete MD5 input, meaning that any whitespace will be removed. Therefore, hash signatures for many definitions change.

@toinehartman toinehartman self-assigned this Feb 11, 2026
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 46%. Comparing base (0d4f663) to head (511ac59).
⚠️ Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
src/org/rascalmpl/library/Prelude.java 80% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2644   +/-   ##
=======================================
  Coverage       46%     46%           
- Complexity    6672    6677    +5     
=======================================
  Files          795     795           
  Lines        65878   65893   +15     
  Branches      9870    9878    +8     
=======================================
+ Hits         30679   30688    +9     
- Misses       32824   32827    +3     
- Partials      2375    2378    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@PaulKlint PaulKlint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, great finding this obscure problem.

The solution looks fine, with one suggestion to improve performance.

@toinehartman toinehartman marked this pull request as draft February 13, 2026 12:09
@toinehartman toinehartman marked this pull request as draft February 13, 2026 12:09
@toinehartman toinehartman marked this pull request as ready for review February 13, 2026 12:43
Copy link
Member

@DavyLandman DavyLandman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

Copy link
Member

@PaulKlint PaulKlint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. This probably the cleanest and fastest solution.

@sonarqubecloud
Copy link

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deze kunnen we nu hier zo laten maar op termijn naar een tools directory moven.

private map[str, str] MD5_ESCAPES = (MD5_CONTRIB_SEPARATOR: "\\<MD5_CONTRIB_SEPARATOR>");

@synopsis{Hash a variable number of contributing values (MD5).}
str normalizedMD5Hash(value contribs...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik vind deze oplossing met varargs heel elegant.

@@ -556,9 +551,6 @@ void collect(current:(Sym) `<Nonterminal n>[ <{Sym ","}+ parameters> ]`, Collect
endDefineOrReuseTypeParameters(c);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mooi dit elimineren van de (kennelijk) niet meer gebruikte md5ContribSym

Copy link
Member

@PaulKlint PaulKlint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ziet er prima uit.

@PaulKlint PaulKlint merged commit 9da96cb into main Feb 16, 2026
9 checks passed
@PaulKlint PaulKlint deleted the fix/os-dependent-logical-locs branch February 16, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants